#include <algorithm>
#include <type_traits>
#include <vector>

class Solution {
 public:
  void moveZeroes(std::vector<int>& nums)
  {
    int slowIndex = 0;
    for (int fastIndex = 0; fastIndex != nums.size(); ++fastIndex)
    {
      if (nums[fastIndex]) { nums[slowIndex++] = nums[fastIndex]; }
    }
    for (; slowIndex != nums.size(); ++slowIndex) { nums[slowIndex] = 0; }
  }
};
